<p>
  <b>Name:</b>
  <%=h @contest.name %>
</p>

<p>
  <b>Start Time:</b>
  <%= contest_date(@contest.start_time.localtime) %> <br/>
  <b>End Time:</b>
  <%= contest_date(@contest.end_time) %> <br/>
  <% if @contest.end_time > Time.now %>
    <b>Time left:</b>
    <%=h ((@contest.end_time - Time.now) / 60.0).to_i%> minutes
  <% else %>
    <b>Contest is over</b>
  <% end %>
</p>

<p>
  <b>Content:</b>
  
  <%= render :file => "#{RAILS_ROOT}/app/views/problems/_problem_table.html.erb", :locals => {:selected_problems => @selected_problems, :contest => @contest} %>
</p>

<% if admin? %>
<%= link_to 'Edit', edit_contest_path(@contest) %> 
<% end %>

<%= link_to 'Board', :action => "board", :id => @contest %>
<%if @contest.end_time < Time.now %>
    <%= link_to 'Offline board', :action => "offline_board", :id => @contest %>
<%end%>